package com.icoolkj.kevin.service;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @author icoolkj
 * @version 1.0
 * @description
 * @createDate 2025/01/27 18:27
 */
public class KevinCondition implements Condition {
	@Override
	public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
		try {
			context.getClassLoader().loadClass("com.icoolkj.kevin.service.User");
			return true;
		} catch (ClassNotFoundException e) {
			//throw new RuntimeException(e);
			return false;
		}
	}
}
